<!DOCTYPE html>
<html>
	
<head>
	<title>Open ModSim JavaScript Documentation</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="assets/css/reset.css">
	<link rel="stylesheet" type="text/css" href="assets/css/style.css">
</head>

<body>
	<h1 class="title">JavaScript Help</h1>
	<p>Built-in objects</p>
	<ul class="level1">
		<li class="object"><a href="#console"><strong>console</strong></a>
			<ul class="level2">
				<li><a href="#console.clear">console.clear</a></li>
				<li><a href="#console.log">console.log</a></li>
				<li><a href="#console.debug">console.debug</a></li>
				<li><a href="#console.warning">console.warning</a></li>
				<li><a href="#console.error">console.error</a></li>
			</ul>
		</li>
		<li class="object"><a href="#date"><strong>Date</strong></a>
			<ul class="level2">
				<li><a href="#date.constructor">Constructor</a></li>
				<li><a href="#date.instance_methods">Date.prototype</a>
					<ul class="level3">
						<li><a href="#date.prototype.getdate">Date.prototype.getDate</a></li>
						<li><a href="#date.prototype.getday">Date.prototype.getDay</a></li>
						<li><a href="#date.prototype.getfullyear">Date.prototype.getFullYear</a></li>
						<li><a href="#date.prototype.gethours">Date.prototype.getHours</a></li>
						<li><a href="#date.prototype.getmilliseconds">Date.prototype.getMilliseconds</a></li>
						<li><a href="#date.prototype.getminutes">Date.prototype.getMinutes</a></li>
						<li><a href="#date.prototype.getmonth">Date.prototype.getMonth</a></li>
						<li><a href="#date.prototype.getseconds">Date.prototype.getSeconds</a></li>
						<li><a href="#date.prototype.gettime">Date.prototype.getTime</a></li>
						<li><a href="#date.prototype.gettimezoneoffset">Date.prototype.getTimezoneOffset</a></li>
						<li><a href="#date.prototype.getutcdate">Date.prototype.getUTCDate</a></li>
						<li><a href="#date.prototype.getutcday">Date.prototype.getUTCDay</a></li>
						<li><a href="#date.prototype.getutcfullyear">Date.prototype.getUTCFullYear</a></li>
						<li><a href="#date.prototype.getutchours">Date.prototype.getUTCHours</a></li>
						<li><a href="#date.prototype.getutcmilliseconds">Date.prototype.getUTCMilliseconds</a></li>
						<li><a href="#date.prototype.getutcminutes">Date.prototype.getUTCMinutes</a></li>
						<li><a href="#date.prototype.getutcmonth">Date.prototype.getUTCMonth</a></li>
						<li><a href="#date.prototype.getutcseconds">Date.prototype.getUTCSeconds</a></li>
						<li><a href="#date.prototype.setdate">Date.prototype.setDate</a></li>
						<li><a href="#date.prototype.setfullyear">Date.prototype.setFullYear</a></li>
						<li><a href="#date.prototype.sethours">Date.prototype.setHours</a></li>
						<li><a href="#date.prototype.setmilliseconds">Date.prototype.setMilliseconds</a></li>
						<li><a href="#date.prototype.setminutes">Date.prototype.setMinutes</a></li>
						<li><a href="#date.prototype.setmonth">Date.prototype.setMonth</a></li>
						<li><a href="#date.prototype.setseconds">Date.prototype.setSeconds</a></li>
						<li><a href="#date.prototype.settime">Date.prototype.setTime</a></li>
						<li><a href="#date.prototype.setutcdate">Date.prototype.setUTCDate</a></li>
						<li><a href="#date.prototype.setutcfullyear">Date.prototype.setUTCFullYear</a></li>
						<li><a href="#date.prototype.setutchours">Date.prototype.setUTCHours</a></li>
						<li><a href="#date.prototype.setutcmilliseconds">Date.prototype.setUTCMilliseconds</a></li>
						<li><a href="#date.prototype.setutcminutes">Date.prototype.setUTCMinutes</a></li>
						<li><a href="#date.prototype.setutcmonth">Date.prototype.setUTCMonth</a></li>
						<li><a href="#date.prototype.setutcseconds">Date.prototype.setUTCSeconds</a></li>
						<li><a href="#date.prototype.todatestring">Date.prototype.toDateString</a></li>
						<li><a href="#date.prototype.toisostring">Date.prototype.toISOString</a></li>
						<li><a href="#date.prototype.tojson">Date.prototype.toJSON</a></li>
						<li><a href="#date.prototype.tolocaledatestring">Date.prototype.toLocaleDateString</a></li>
						<li><a href="#date.prototype.tolocalestring">Date.prototype.toLocaleString</a></li>
						<li><a href="#date.prototype.tolocaletimestring">Date.prototype.toLocaleTimeString</a></li>
						<li><a href="#date.prototype.tostring">Date.prototype.toString</a></li>
						<li><a href="#date.prototype.totimestring">Date.prototype.toTimeString</a></li>
						<li><a href="#date.prototype.toutcstring">Date.prototype.toUTCString</a></li>
						<li><a href="#date.prototype.valueof">Date.prototype.valueOf</a></li>
					</ul>
				</li>
				<li><a href="#date.now">Date.now</a></li>
				<li><a href="#date.parse">Date.parse</a></li>
				<li><a href="#date.utc">Date.UTC</a></li>
			</ul>
		</li>
		<li class="object"><a href="#math"><strong>Math</strong></a>
			<ul class="level2">
				<li><a href="#math.e">Math.E</a></li>
				<li><a href="#math.ln10">Math.LN10</a></li>
				<li><a href="#math.ln2">Math.LN2</a></li>
				<li><a href="#math.log10e">Math.LOG10E</a></li>
				<li><a href="#math.log2e">Math.LOG2E</a></li>
				<li><a href="#math.pi">Math.PI</a></li>
				<li><a href="#math.sqrt1_2">Math.SQRT1_2</a></li>
				<li><a href="#math.sqrt2">Math.SQRT2</a></li>
				<li><a href="#math.abs">Math.abs</a></li>
				<li><a href="#math.acos">Math.acos</a></li>
				<li><a href="#math.acosh">Math.acosh</a></li>
				<li><a href="#math.asin">Math.asin</a></li>
				<li><a href="#math.asinh">Math.asinh</a></li>
				<li><a href="#math.atan">Math.atan</a></li>
				<li><a href="#math.atanh">Math.atanh</a></li>
				<li><a href="#math.atan2">Math.atan2</a></li>
				<li><a href="#math.cbrt">Math.cbrt</a></li>
				<li><a href="#math.ceil">Math.ceil</a></li>
				<li><a href="#math.clz32">Math.clz32</a></li>
				<li><a href="#math.cos">Math.cos</a></li>
				<li><a href="#math.cosh">Math.cosh</a></li>
				<li><a href="#math.exp">Math.exp</a></li>
				<li><a href="#math.expm1">Math.expm1</a></li>
				<li><a href="#math.floor">Math.floor</a></li>
				<li><a href="#math.fround">Math.fround</a></li>
				<li><a href="#math.hypot">Math.hypot</a></li>
				<li><a href="#math.imul">Math.imul</a></li>
				<li><a href="#math.log">Math.log</a></li>
				<li><a href="#math.log1p">Math.log1p</a></li>
				<li><a href="#math.log10">Math.log10</a></li>
				<li><a href="#math.log2">Math.log2</a></li>
				<li><a href="#math.max">Math.max</a></li>
				<li><a href="#math.min">Math.min</a></li>
				<li><a href="#math.pow">Math.pow</a></li>
				<li><a href="#math.random">Math.random</a></li>
				<li><a href="#math.round">Math.round</a></li>
				<li><a href="#math.sign">Math.sign</a></li>
				<li><a href="#math.sin">Math.sin</a></li>
				<li><a href="#math.sinh">Math.sinh</a></li>
				<li><a href="#math.sqrt">Math.sqrt</a></li>
				<li><a href="#math.tan">Math.tan</a></li>
				<li><a href="#math.tanh">Math.tanh</a></li>
				<li><a href="#math.trunc">Math.trunc</a></li>
			</ul>
		</li>
		<li class="object"><a href="#script"><strong>Script</strong></a>
			<ul class="level2">
				<li><a href="#script.runcount">Script.runCount</a></li>
				<li><a href="#script.period">Script.period</a></li>
				<li><a href="#script.oninit">Script.onInit</a></li>
				<li><a href="#script.settimeout">Script.setTimeout</a></li>
				<li><a href="#script.stop">Script.stop</a></li>
			</ul>
		</li>
		<li class="object"><a href="#server"><strong>Server</strong></a>
			<ul class="level2">
				<li><a href="#server.onchange">Server.onChange</a></li>
				<li><a href="#server.readcoil">Server.readCoil</a></li>
				<li><a href="#server.readdiscrete">Server.readDiscrete</a></li>
				<li><a href="#server.readinput">Server.readInput</a></li>
				<li><a href="#server.readholding">Server.readHolding</a></li>
				<li><a href="#server.readint32">Server.readInt32</a></li>
				<li><a href="#server.readint64">Server.readInt64</a></li>
				<li><a href="#server.readuint32">Server.readUInt32</a></li>
				<li><a href="#server.readuint64">Server.readUInt64</a></li>
				<li><a href="#server.readdouble">Server.readDouble</a></li>
				<li><a href="#server.readfloat">Server.readFloat</a></li>
				<li><a href="#server.writecoil">Server.writeCoil</a></li>
				<li><a href="#server.writediscrete">Server.writeDiscrete</a></li>
				<li><a href="#server.writeinput">Server.writeInput</a></li>
				<li><a href="#server.writeholding">Server.writeHolding</a></li>
				<li><a href="#server.writeint32">Server.writeInt32</a></li>
				<li><a href="#server.writeint64">Server.writeInt64</a></li>
				<li><a href="#server.writeunint32">Server.writeUInt32</a></li>
				<li><a href="#server.writeunint64">Server.writeUInt64</a></li>
				<li><a href="#server.writedouble">Server.writeDouble</a></li>
				<li><a href="#server.writefloat">Server.writeFloat</a></li>
			</ul>
		</li>
		<li class="object"><a href="#storage"><strong>Storage</strong></a>
			<ul class="level2">
				<li><a href="#storage.length">Storage.length</a></li>
				<li><a href="#storage.clear">Storage.clear</a></li>
				<li><a href="#storage.key">Storage.key</a></li>
				<li><a href="#storage.getitem">Storage.getItem</a></li>
				<li><a href="#storage.setitem">Storage.setItem</a></li>
				<li><a href="#storage.removeitem">Storage.removeItem</a></li>
			</ul>
		</li>
	</ul>
	<article class="article-content">
		<div class="article-header">
			<h1 id="console">console</h1>
		</div>
		<div class="section-content"><p>The <strong><code>console</code></strong> object provides access to debugging console.</p></div>
		<section aria-labelledby="static_methods"><h2 id="console.static_methods">Static methods</h2><div class="section-content"><dl>
			<dt id="console.clear"><code>console.clear()</code></dt>
			<dd>
				<p>Clear the console.</p>
			</dd>
			<dt id="console.debug"><code>console.debug()</code></dt>
			<dd>
				<p>Outputs a message to the console with the log level <code>debug</code>.</p>
			</dd>
			<dt id="console.error"><code>console.error()</code></dt>
			<dd>
				<p>Outputs an error message.</p>
			</dd>
			<dt id="console.log"><code>console.log()</code></dt>
			<dd>
				<p>For general output of logging information.</p>
			</dd>
			<dt id="console.warning"><code>console.warning()</code></dt>
			<dd>
			  	<p>Outputs a warning message.</p>
			</dd>
		</dl></div></section>
	</article>
	<article class="article-content">
		<div class="article-header">
			<h1 id="date">Date</h1>
		</div>
		<div class="section-content"><p>A JavaScript date is fundamentally specified as the number of milliseconds that have elapsed since the ECMAScript epoch, which is defined as the midnight at the beginning of January 1, 1970, UTC (equivalent to the UNIX epoch).</p></div>
		<section aria-labelledby="constructor"><h2 id="date.constructor">Constructor</h2><div class="section-content"><dl>
			<dt id="date"><code>Date()</code></a></dt>
			<dd>
				<p>When called as a function, returns a string representation of the current date and time. All arguments are ignored. The result is the same as executing <code>new Date().toString()</code>.</p>
			</dd>
			<dt id="new_date"><code>new Date()</code></a></dt>
			<dd>
				<p>When called as a constructor, returns a new <code>Date</code> object.</p>
			</dd>
		</dl></div></section>
		<section aria-labelledby="static_methods"><h2 id="date.static_methods">Static methods</h2><div class="section-content"><dl></dl>
			<dt id="date.now"><code>Date.now()</code></dt>
  			<dd>
    			<p>Returns the numeric value corresponding to the current time — the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC, with leap seconds ignored.</p>
  			</dd>
  			<dt id="date.parse"><code>Date.parse()</code></dt>
  			<dd>
    			<p>Parses a string representation of a date and returns the number of milliseconds since 1 January, 1970, 00:00:00 UTC, with leap seconds ignored.</p>
  			</dd>
  			<dt id="date.utc"><code>Date.UTC()</code></dt>
  			<dd>
    			<p>Accepts the same parameters as the longest form of the constructor (i.e. 2 to 7) and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC, with leap seconds ignored.</p>
  			</dd>
		</dl></div></section>
		<section aria-labelledby="instance_methods"><h2 id="date.instance_methods">Instance methods</h2><div class="section-content"><dl>
			<dt id="date.prototype.getdate"><code>Date.prototype.getDate()</a></dt>
			<dd>
			  	<p>Returns the day of the month (<code>1</code> – <code>31</code>) for the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.getday"><code>Date.prototype.getDay()</code></dt>
			<dd>
			  	<p>Returns the day of the week (<code>0</code> – <code>6</code>) for the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.getfullyear"><code>Date.prototype.getFullYear()</code></dt>
			<dd>
			  	<p>Returns the year (4 digits for 4-digit years) of the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.gethours"><code>Date.prototype.getHours()</code></dt>
			<dd>
			  	<p>Returns the hour (<code>0</code> – <code>23</code>) in the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.getmilliseconds"><code>Date.prototype.getMilliseconds()</code></dt>
			<dd>
			  	<p>Returns the milliseconds (<code>0</code> – <code>999</code>) in the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.getminutes"><code>Date.prototype.getMinutes()</code></dt>
			<dd>
			  	<p>Returns the minutes (<code>0</code> – <code>59</code>) in the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.getmonth"><code>Date.prototype.getMonth()</code></dt>
			<dd>
			  	<p>Returns the month (<code>0</code> – <code>11</code>) in the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.getseconds"><code>Date.prototype.getSeconds()</code></dt>
			<dd>
			  	<p>Returns the seconds (<code>0</code> – <code>59</code>) in the specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.gettime"><code>Date.prototype.getTime()</code></dt>
			<dd>
			  	<p>Returns the numeric value of the specified date as the number of milliseconds since January 1, 1970, 00:00:00 UTC. (Negative values are returned for prior times.)</p>
			</dd>
			<dt id="date.prototype.gettimezoneoffset"><code>Date.prototype.getTimezoneOffset()</code></dt>
			<dd>
			  	<p>Returns the time-zone offset in minutes for the current locale.</p>
			</dd>
			<dt id="date.prototype.getutcdate"><code>Date.prototype.getUTCDate()</code></dt>
			<dd>
			  	<p>Returns the day (date) of the month (<code>1</code> – <code>31</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutcday"><code>Date.prototype.getUTCDay()</code></dt>
			<dd>
			  	<p>Returns the day of the week (<code>0</code> – <code>6</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutcfullyear"><code>Date.prototype.getUTCFullYear()</code></dt>
			<dd>
			  	<p>Returns the year (4 digits for 4-digit years) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutchours"><code>Date.prototype.getUTCHours()</code></dt>
			<dd>
			  	<p>Returns the hours (<code>0</code> – <code>23</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutcmilliseconds"><code>Date.prototype.getUTCMilliseconds()</code></dt>
			<dd>
			  <p>Returns the milliseconds (<code>0</code> – <code>999</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutcminutes"><code>Date.prototype.getUTCMinutes()</code></dt>
			<dd>
			  	<p>Returns the minutes (<code>0</code> – <code>59</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutcmonth"><code>Date.prototype.getUTCMonth()</code></dt>
			<dd>
			  	<p>Returns the month (<code>0</code> – <code>11</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.getutcseconds"><code>Date.prototype.getUTCSeconds()</code></dt>
			<dd>
			  	<p>Returns the seconds (<code>0</code> – <code>59</code>) in the specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setdate"><code>Date.prototype.setDate()</code></dt>
			<dd>
			  	<p>Sets the day of the month for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.setfullyear"><code>Date.prototype.setFullYear()</code></dt>
			<dd>
			  	<p>Sets the full year (e.g. 4 digits for 4-digit years) for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.sethours"><code>Date.prototype.setHours()</code></dt>
			<dd>
			  	<p>Sets the hours for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.setmilliseconds"><code>Date.prototype.setMilliseconds()</code></dt>
			<dd>
				<p>Sets the milliseconds for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.setminutes"><code>Date.prototype.setMinutes()</code></dt>
			<dd>
			  	<p>Sets the minutes for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.setmonth"><code>Date.prototype.setMonth()</code></dt>
			<dd>
			  	<p>Sets the month for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.setseconds"><code>Date.prototype.setSeconds()</code></dt>
			<dd>
			  	<p>Sets the seconds for a specified date according to local time.</p>
			</dd>
			<dt id="date.prototype.settime"><code>Date.prototype.setTime()</code></dt>
			<dd>
			  	<p>Sets the <code>Date</code> object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC. Use negative numbers for times prior.</p>
			</dd>
			<dt id="date.prototype.setutcdate"><code>Date.prototype.setUTCDate()</code></dt>
			<dd>
			  	<p>Sets the day of the month for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setutcfullyear"><code>Date.prototype.setUTCFullYear()</code></dt>
			<dd>
			  	<p>Sets the full year (e.g. 4 digits for 4-digit years) for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setutchours"><code>Date.prototype.setUTCHours()</code></dt>
			<dd>
			  	<p>Sets the hour for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setutcmilliseconds"><code>Date.prototype.setUTCMilliseconds()</code></dt>
			<dd>
			  	<p>Sets the milliseconds for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setutcminutes"><code>Date.prototype.setUTCMinutes()</code></dt>
			<dd>
			  	<p>Sets the minutes for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setutcmonth"><code>Date.prototype.setUTCMonth()</code></dt>
			<dd>
			  	<p>Sets the month for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.setutcseconds"><code>Date.prototype.setUTCSeconds()</code></dt>
			<dd>
			  	<p>Sets the seconds for a specified date according to universal time.</p>
			</dd>
			<dt id="date.prototype.todatestring"><code>Date.prototype.toDateString()</code></dt>
			<dd>
			  	<p>Returns the "date" portion of the <code>Date</code> as a human-readable string like <code>'Thu Apr 12 2018'</code>.</p>
			</dd>
			<dt id="date.prototype.toisostring"><code>Date.prototype.toISOString()</code></dt>
			<dd>
			  	<p>Converts a date to a string following the ISO 8601 Extended Format.</p>
			</dd>
			<dt id="date.prototype.tojson"><code>Date.prototype.toJSON()</code></dt>
			<dd>
			  	<p>Returns a string representing the <code>Date</code> using <code>toISOString()</code>.</p>
			</dd>
			<dt id="date.prototype.tolocaledatestring"><code>Date.prototype.toLocaleDateString()</code></dt>
			<dd>
			  	<p>Returns a string with a locality sensitive representation of the date portion of this date based on system settings.</p>
			</dd>
			<dt id="date.prototype.tolocalestring"><code>Date.prototype.toLocaleString()</code></dt>
			<dd>
			  	<p>Returns a string with a locality-sensitive representation of this date.</p>
			</dd>
			<dt id="date.prototype.tolocaletimestring"><code>Date.prototype.toLocaleTimeString()</code></dt>
			<dd>
			  	<p>Returns a string with a locality-sensitive representation of the time portion of this date, based on system settings.</p>
			</dd>
			<dt id="date.prototype.tostring"><code>Date.prototype.toString()</code></dt>
			<dd>
			  	<p>Returns a string representing the specified <code>Date</code> object.</p>
			</dd>
			<dt id="date.prototype.totimestring"><code>Date.prototype.toTimeString()</code></dt>
			<dd>
			  	<p>Returns the "time" portion of the <code>Date</code> as a human-readable string.</p>
			</dd>
			<dt id="date.prototype.toutcstring"><code>Date.prototype.toUTCString()</code></dt>
			<dd>
			  	<p>Converts a date to a string using the UTC timezone.</p>
			</dd>
			<dt id="date.prototype.valueof"><code>Date.prototype.valueOf()</code></dt>
			<dd>
			  	<p>Returns the primitive value of a <code>Date</code> object.</p>
			</dd>
		  </dl></div></section>
	  </article>
	  <article class="article-content">
		<div class="article-header">
			<h1 id="math">Math</h1>
		</div>
		<div class="section-content"><p><strong><code>Math</code></strong> is a built-in object that has properties and methods for mathematical constants and functions. It's not a function object.</p>
		<p><code>Math</code> works with the <code>Number</code> type. It doesn't work with <code>BigInt</code>.</p></div><section aria-labelledby="description"><h2 id="math.description">Description</h2><div class="section-content"><p>Unlike many other global objects, <code>Math</code> is not a constructor. All properties and methods of <code>Math</code> are static. You refer to the constant pi as <code>Math.PI</code> and you call the sine function as <code>Math.sin(x)</code>, where <code>x</code> is the method's argument. Constants are defined with the full precision of real numbers in JavaScript.</p></div></section>  
		<section aria-labelledby="static_properties"><h2 id="math.static_properties">Static properties</h2><div class="section-content"><dl>
		  <dt id="math.e"><code>Math.E</code></dt>
		  <dd>
			<p>Euler's number and the base of natural logarithms; approximately <code>2.718</code>.</p>
		  </dd>
		  <dt id="math.ln2"><code>Math.LN2</code></dt>
		  <dd>
			<p>Natural logarithm of <code>2</code>; approximately <code>0.693</code>.</p>
		  </dd>
		  <dt id="math.ln10"><code>Math.LN10</code></dt>
		  <dd>
			<p>Natural logarithm of <code>10</code>; approximately <code>2.303</code>.</p>
		  </dd>
		  <dt id="math.log2e"><code>Math.LOG2E</code></dt>
		  <dd>
			<p>Base-2 logarithm of <code>E</code>; approximately <code>1.443</code>.</p>
		  </dd>
		  <dt id="math.log10e"><code>Math.LOG10E</code></dt>
		  <dd>
			<p>Base-10 logarithm of <code>E</code>; approximately <code>0.434</code>.</p>
		  </dd>
		  <dt id="math.pi"><code>Math.PI</code></dt>
		  <dd>
			<p>Ratio of a circle's circumference to its diameter; approximately <code>3.14159</code>.</p>
		  </dd>
		  <dt id="math.sqrt1_2"><code>Math.SQRT1_2</code></dt>
		  <dd>
			<p>Square root of ½; approximately <code>0.707</code>.</p>
		  </dd>
		  <dt id="math.sqrt2"><code>Math.SQRT2</code></dt>
		  <dd>
			<p>Square root of <code>2</code>; approximately <code>1.414</code>.</p>
		  </dd>
		</dl></div></section><section aria-labelledby="static_methods"><h2 id="math.static_methods">Static methods</h2><div class="section-content"><dl>
		  <dt id="math.abs"><code>Math.abs()</code></dt>
		  <dd>
			<p>Returns the absolute value of <code>x</code>.</p>
		  </dd>
		  <dt id="math.acos"><code>Math.acos()</code></dt>
		  <dd>
			<p>Returns the arccosine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.acosh"><code>Math.acosh()</code></dt>
		  <dd>
			<p>Returns the hyperbolic arccosine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.asin"><code>Math.asin()</code></dt>
		  <dd>
			<p>Returns the arcsine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.asinh"><code>Math.asinh()</code></dt>
		  <dd>
			<p>Returns the hyperbolic arcsine of a number.</p>
		  </dd>
		  <dt id="math.atan"><code>Math.atan()</code></dt>
		  <dd>
			<p>Returns the arctangent of <code>x</code>.</p>
		  </dd>
		  <dt id="math.atanh"><code>Math.atanh()</code></dt>
		  <dd>
			<p>Returns the hyperbolic arctangent of <code>x</code>.</p>
		  </dd>
		  <dt id="math.atan2"><code>Math.atan2()</code></dt>
		  <dd>
			<p>Returns the arctangent of the quotient of its arguments.</p>
		  </dd>
		  <dt id="math.cbrt"><code>Math.cbrt()</code></dt>
		  <dd>
			<p>Returns the cube root of <code>x</code>.</p>
		  </dd>
		  <dt id="math.ceil"><code>Math.ceil()</code></dt>
		  <dd>
			<p>Returns the smallest integer greater than or equal to <code>x</code>.</p>
		  </dd>
		  <dt id="math.clz32"><code>Math.clz32()</code></dt>
		  <dd>
			<p>Returns the number of leading zero bits of the 32-bit integer <code>x</code>.</p>
		  </dd>
		  <dt id="math.cos"><code>Math.cos()</code></dt>
		  <dd>
			<p>Returns the cosine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.cosh"><code>Math.cosh()</code></dt>
		  <dd>
			<p>Returns the hyperbolic cosine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.exp"><code>Math.exp()</code></dt>
		  <dd>
			<p>Returns e<sup>x</sup>, where x is the argument, and e is Euler's number (<code>2.718</code>…, the base of the natural logarithm).</p>
		  </dd>
		  <dt id="math.expm1"><code>Math.expm1()</code></dt>
		  <dd>
			<p>Returns subtracting <code>1</code> from <code>exp(x)</code>.</p>
		  </dd>
		  <dt id="math.floor"><code>Math.floor()</code></dt>
		  <dd>
			<p>Returns the largest integer less than or equal to <code>x</code>.</p>
		  </dd>
		  <dt id="math.fround"><code>Math.fround()</code></dt>
		  <dd>
			<p>Returns the nearest single precision float representation of <code>x</code>.</p>
		  </dd>
		  <dt id="math.hypot"><code>Math.hypot()</code></dt>
		  <dd>
			<p>Returns the square root of the sum of squares of its arguments.</p>
		  </dd>
		  <dt id="math.imul"><code>Math.imul()</code></dt>
		  <dd>
			<p>Returns the result of the 32-bit integer multiplication of <code>x</code> and <code>y</code>.</p>
		  </dd>
		  <dt id="math.log"><code>Math.log()</code></dt>
		  <dd>
			<p>Returns the natural logarithm (log<sub>e</sub>; also, ln) of <code>x</code>.</p>
		  </dd>
		  <dt id="math.log1p"><code>Math.log1p()</code></dt>
		  <dd>
			<p>Returns the natural logarithm (log<sub>e</sub>; also ln) of <code>1 + x</code> for the number <code>x</code>.</p>
		  </dd>
		  <dt id="math.log10"><code>Math.log10()</code></dt>
		  <dd>
			<p>Returns the base-10 logarithm of <code>x</code>.</p>
		  </dd>
		  <dt id="math.log2"><code>Math.log2()</code></dt>
		  <dd>
			<p>Returns the base-2 logarithm of <code>x</code>.</p>
		  </dd>
		  <dt id="math.max"><code>Math.max()</code></dt>
		  <dd>
			<p>Returns the largest of zero or more numbers.</p>
		  </dd>
		  <dt id="math.min"><code>Math.min()</code></dt>
		  <dd>
			<p>Returns the smallest of zero or more numbers.</p>
		  </dd>
		  <dt id="math.pow"><code>Math.pow()</code></dt>
		  <dd>
			<p>Returns base <code>x</code> to the exponent power <code>y</code> (that is, <code>x</code><sup><code>y</code></sup>).</p>
		  </dd>
		  <dt id="math.random"><code>Math.random()</code></dt>
		  <dd>
			<p>Returns a pseudo-random number between <code>0</code> and <code>1</code>.</p>
		  </dd>
		  <dt id="math.round"><code>Math.round()</code></dt>
		  <dd>
			<p>Returns the value of the number <code>x</code> rounded to the nearest integer.</p>
		  </dd>
		  <dt id="math.sign"><code>Math.sign()</code></dt>
		  <dd>
			<p>Returns the sign of the <code>x</code>, indicating whether <code>x</code> is positive, negative, or zero.</p>
		  </dd>
		  <dt id="math.sin"><code>Math.sin()</code></dt>
		  <dd>
			<p>Returns the sine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.sinh"><code>Math.sinh()</code></dt>
		  <dd>
			<p>Returns the hyperbolic sine of <code>x</code>.</p>
		  </dd>
		  <dt id="math.sqrt"><code>Math.sqrt()</code></dt>
		  <dd>
			<p>Returns the positive square root of <code>x</code>.</p>
		  </dd>
		  <dt id="math.tan"><code>Math.tan()</code></dt>
		  <dd>
			<p>Returns the tangent of <code>x</code>.</p>
		  </dd>
		  <dt id="math.tanh"><code>Math.tanh()</code></dt>
		  <dd>
			<p>Returns the hyperbolic tangent of <code>x</code>.</p>
		  </dd>
		  <dt id="math.trunc"><code>Math.trunc()</code></dt>
		  <dd>
			<p>Returns the integer portion of <code>x</code>, removing any fractional digits.</p>
		  </dd>
		</dl></div></section>
	</article>
	<article class="article-content">
		<div class="article-header">
			<h1 id="script">Script</h1>
		</div>
		<div class="section-content"><p>The <strong><code>Script</code></strong> object provides access to the script features.</p></div>
		<section aria-labelledby="static_properties"><h2 id="script.static_properties">Static properties</h2><div class="section-content"><dl>
			<dt id="script.runcount"><code>Script.runCount</code></dt>
			<dd>
			  <p>Returns the number of script execution in Periodically mode.</p>
			</dd>
			<dt id="script.period"><code>Script.period</code></dt>
			<dd>
			  <p>Returns the number of milliseconds between script runs in Periodically mode.</p>
			</dd>
		</dl></div></section>
		<section aria-labelledby="static_methods"><h2 id="script.static_methods">Static methods</h2><div class="section-content"><dl>
			<dt id="script.oninit"><code>Script.onInit(functionRef)</code></dt>
			<dd>
				<p>Executes a function on first script run.</p>
			</dd>
			<dt id="script.settimeout"><code>Script.setTimeout(functionRef, delay)</code></dt>
			<dd>
				<p>The method sets a timer which executes a function once the timer expires.</p>
			</dd>
			<dt id="script.stop"><code>Script.stop()</code></dt>
			<dd>
			  <p>Stops the script execution.</p>
			</dd>
		</dl></div></section>
	</article>
	<article class="article-content">
		<div class="article-header">
			<h1 id="server">Server</h1>
		</div>
		<div class="section-content"><p>The <strong><code>Server</code></strong> object provides access to the MODBUS server functionality.</p></div>
		<section aria-labelledby="static_methods"><h2 id="server.static_methods">Static methods</h2><div class="section-content"><dl>
			<dt id="server.onchange"><code>Server.onChange(Register, address, functionRef)</code></dt>
			<dd>
				<p>Executes a <code>functionRef(value)</code> when a <code>Register</code> value at <code>address</code> was changed.</p>
			</dd>
			<dt id="server.readcoil"><code>Server.readCoil(address)</code></dt>
			<dd>
				<p>Returns a Coil register value at <code>address</code>.</p>
			</dd>
			<dt id="server.readdiscrete"><code>Server.readDiscrete(address)</code></dt>
			<dd>
				<p>Returns a Discrete register value at <code>address</code>.</p>
			</dd>
			<dt id="server.readinput"><code>Server.readInput(address)</code></dt>
			<dd>
				<p>Returns a Input register value at <code>address</code>.</p>
			</dd>
			<dt id="server.readholding"><code>Server.readHolding(address)</code></dt>
			<dd>
				<p>Returns a Holding register value at <code>address</code>.</p>
			</dd>
			<dt id="server.readint32"><code>Server.readInt32(Register, address, swapped)</code></dt>
			<dd>
				<p>Returns a 32-bit integer value from <code>address</code> to <code>address + 1</code> registers type <code>Register</code>. The <code>swapped</code> parameter change the registers order, when function convert set of registers to a 32-bit integer value.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.readint64"><code>Server.readInt64(Register, address, swapped)</code></dt>
			<dd>
				<p>Returns a 64-bit integer value from <code>address</code> to <code>address + 3</code> registers type <code>Register</code>. The <code>swapped</code> parameter change the registers order, when function convert set of registers to a 64-bit integer value.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.readuint32"><code>Server.readUInt32(Register, address, swapped)</code></dt>
			<dd>
				<p>Returns a 32-bit unsigned integer value from <code>address</code> to <code>address + 1</code> registers type <code>Register</code>. The <code>swapped</code> parameter change the registers order, when function convert set of registers to a 32-bit unsigned integer value.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.readuint64"><code>Server.readUInt64(Register, address, swapped)</code></dt>
			<dd>
				<p>Returns a 64-bit unsigned integer value from <code>address</code> to <code>address + 3</code> registers type <code>Register</code>. The <code>swapped</code> parameter change the registers order, when function convert set of registers to a 64-bit unsigned integer value.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.readdouble"><code>Server.readDouble(Register, address, swapped)</code></dt>
			<dd>
				<p>Returns a double value from <code>address</code> to <code>address + 3</code> registers type <code>Register</code>. The <code>swapped</code> parameter change the registers order, when function convert set of registers to a double value.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.readfloat"><code>Server.readFloat(Register, address, swapped)</code></dt>
			<dd>
				<p>Returns a float value from <code>address</code> to <code>address + 1</code> registers type <code>Register</code>. The <code>swapped</code> parameter change the registers order, when function convert set of registers to a float value.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.writecoil"><code>Server.writeCoil(address, value)</code></dt>
			<dd>
				<p>Writes a <code>value</code> to the Coil register at <code>address</code>.</p>
			</dd>
			<dt id="server.writediscrete"><code>Server.writeDiscrete(address, value)</code></dt>
			<dd>
				<p>Writes a <code>value</code> to the Discrete register at <code>address</code>.</p>
			</dd>
			<dt id="server.writeinput"><code>Server.writeInput(address, value)</code></dt>
			<dd>
				<p>Writes a <code>value</code> to the Input register at <code>address</code>.</p>
			</dd>
			<dt id="server.writeholding"><code>Server.writeHolding(address, value)</code></dt>
			<dd>
				<p>Writes a <code>value</code> to the Holding register at <code>address</code>.</p>
			</dd>
			<dt id="server.writeint32"><code>Server.writeInt32(Register, address, value, swapped)</code></dt>
			<dd>
				<p>Writes a 32-bit integer <code>value</code> to the <code>Register</code> addresses. The <code>swapped</code> parameter change the registers order, when function convert a 32-bit integer value to the set of registers.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.writeint64"><code>Server.writeInt64(Register, address, value, swapped)</code></dt>
			<dd>
				<p>Writes a 64-bit integer <code>value</code> to the <code>Register</code> addresses. The <code>swapped</code> parameter change the registers order, when function convert a 64-bit integer value to the set of registers.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.writeunint32"><code>Server.writeUInt32(Register, address, value, swapped)</code></dt>
			<dd>
				<p>Writes a 32-bit unsigned integer <code>value</code> to the <code>Register</code> addresses. The <code>swapped</code> parameter change the registers order, when function convert a 32-bit unsigned integer value to the set of registers.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.writeunint64"><code>Server.writeUInt64(Register, address, value, swapped)</code></dt>
			<dd>
				<p>Writes a 64-bit unsigned integer <code>value</code> to the <code>Register</code> addresses. The <code>swapped</code> parameter change the registers order, when function convert a 64-bit unsigned integer value to the set of registers.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.writedouble"><code>Server.writeDouble(Register, address, value, swapped)</code></dt>
			<dd>
				<p>Writes a double <code>value</code> to the <code>Register</code> addresses. The <code>swapped</code> parameter change the registers order, when function convert a double value to the set of registers.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
			<dt id="server.writefloat"><code>Server.writeFloat(Register, address, value, swapped)</code></dt>
			<dd>
				<p>Writes a float <code>value</code> to the <code>Register</code> addresses. The <code>swapped</code> parameter change the registers order, when function convert a float value to the set of registers.</p>
				<div class="notecard note">
					<p><strong>Note:</strong> This function is available only for <code>Register.Input</code> and <code>Register.Holding</code> registers.</p>
				</div>
			</dd>
		</dl></div></section>
	</article>
	<article class="article-content">
		<div class="article-header">
			<h1 id="storage">Storage</h1>
		</div>
		<div class="section-content">
			<p>The <strong><code>Storage</code></strong> provides access to a script local storage. It allows, for example, the addition, modification, or deletion of stored data items.</p>
			<p>The <strong><code>Storage</code></strong> object store items while script is running (Once or Periodically). When a script is started the <code>Storage</code> object has no items.</p>
		</div>
		<section aria-labelledby="static_properties"><h2 id="storage.static_properties">Static properties</h2><div class="section-content"><dl>
			<dt id="storage.length"><code>Storage.length</code></dt>
			<dd>
			  <p>Returns an integer representing the number of data items stored in the <code>Storage</code> object.</p>
			</dd>
		</dl></div></section>
		<section aria-labelledby="static_methods"><h2 id="storage.static_methods">Static methods</h2><div class="section-content"><dl>
			<dt id="storage.key"><code>Storage.key(index)</code></dt>
			<dd>
				<p>Return the name of the nth key by <code>index</code> in the storage.</p>
			</dd>
			<dt id="storage.getitem"><code>Storage.getItem(key)</code></dt>
			<dd>
				<p>When passed a <code>key</code> name, will return that key's value.</p>
			</dd>
			<dt id="storage.setitem"><code>Storage.setItem(key, value)</code></dt>
			<dd>
				<p>When passed a <code>key</code> name and value, will add that key to the storage, or update that key's <code>value</code> if it already exists.</p>
			</dd>
			<dt id="storage.removeitem"><code>Storage.removeItem(key)</code></dt>
			<dd>
				<p>When passed a <code>key</code> name, will remove that key from the storage.</p>
			</dd>
			<dt id="storage.clear"><code>Storage.clear()</code></dt>
			<dd>
				<p>When invoked, will empty all keys out of the storage.</p>
			</dd>
		</dl></div></section>
	</article>

</body>

</html>